<?php
/**
 * Example Application
 *
 * @package Example-application
 */
 
if (file_exists("Smarty_3.1.20/libs/Smarty.class.php"))
{
	include 'Smarty_3.1.20/libs/Smarty.class.php';
}
else
{
	echo "Não Achei";
}

$smarty = new Smarty;

$smarty->force_compile = true;
$smarty->debugging = true;
$smarty->caching = true;
$smarty->cache_lifetime = 120;

/*
$smarty->assign("Name", "Fred Irving Johnathan Bradley Peppergill", true);
$smarty->assign("FirstName", array("John", "Mary", "James", "Henry"));
$smarty->assign("LastName", array("Doe", "Smith", "Johnson", "Case"));
$smarty->assign("Class", array(array("A", "B", "C", "D"), array("E", "F", "G", "H"),
                               array("I", "J", "K", "L"), array("M", "N", "O", "P")));

$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
                                  array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234")));

$smarty->assign("option_values", array("NY", "NE", "KS", "IA", "OK", "TX"));
$smarty->assign("option_output", array("New York", "Nebraska", "Kansas", "Iowa", "Oklahoma", "Texas"));
$smarty->assign("option_selected", "NE");
*/

$templates[] = 'advogados';
$templates[] = 'artigo001';
$templates[] = 'artigo002'; 
$templates[] = 'artigo003';
$templates[] = 'artigo004';
$templates[] = 'artigo005'; 
$templates[] = 'artigo006'; 
$templates[] = 'areas';
$templates[] = 'agradecimento';
$templates[] = 'clientes';
$templates[] = 'contato';
$templates[] = 'empresa';
$templates[] = 'eventos';
$templates[] = 'eventos_index';
$templates[] = 'eventos1999';
$templates[] = 'eventos2000';
$templates[] = 'eventos2002';
$templates[] = 'eventos2003';
$templates[] = 'eventos2004';
$templates[] = 'eventos2005';
$templates[] = 'eventos2006';
$templates[] = 'eventos2007';
$templates[] = 'eventos2008';
$templates[] = 'eventos2009';
$templates[] = 'imprensa';
$templates[] = 'salaimprensa';
$templates[] = 'jurisprudencia';
$templates[] = 'legislacao';
$templates[] = 'processosOnline';
$templates[] = 'obrigado';
$templates[] = 'erro';
$templates[] = 'clipping001';
$templates[] = 'clipping002';
$templates[] = 'clipping003';
$templates[] = 'clipping004';
$templates[] = 'clipping005';
$templates[] = 'clipping006';
$templates[] = 'clipping007';
$templates[] = 'clipping008';
$templates[] = 'clipping009';
$templates[] = 'admin';

$pagina = $_GET['pagina'];

if(!$pagina || !in_array($pagina, $templates))
{
	$pagina = "index";
}

//$smarty = new SmartyConnect("");
$smarty->display($pagina.'.tpl');

//$smarty->display('index.tpl');
